
local LrDialogs = import 'LrDialogs'
local LrFunctionContext = import 'LrFunctionContext'
local LrHttp = import 'LrHttp'
local LrTasks = import 'LrTasks'
local LrView = import 'LrView'

WelcomeInfoDialog = {}

function WelcomeInfoDialog:showWelcomeDialog()

	LrFunctionContext.callWithContext( "WelcomeInfo", function( context )
		local viewFactory = LrView.osFactory()
		
		local column = viewFactory:column {
			spacing = viewFactory:control_spacing(),
			
			viewFactory:row
			{
				viewFactory:static_text 
				{
					title = "This plugin will import Picasa Metadata from pictures that are or were part of a Picasa library.",
					height_in_lines = -1,
					width_in_digits = 70
				}
			},
			viewFactory:row
			{
				viewFactory:static_text 
				{
					title = [[This plugin will import the following attributes from Picasa:
	* Star (as text metadata)
	* Album Name (as text metadata)
	* // Rotation / Flipped (Sorry not possible with current Lightroom API)

Short Usage Instructions:

To import the Picasa metadata, first select the picture that you want your metadata imported to. Then goto the 'File' menu and select 'Plug-In Extras' then select 'Update Picasa Metadata for selected Photos'.

Once you have your Picasa metadata imported, you can view this information in Library module in the Metadata pane. Select the 'Picasa Metadata' set. 

Note you can use the metadata to filter. As an example you can create a filter that shows all the pictures that you had started under Picasa. Then you can could chose to set all those pictures to 'Flagged']],
					height_in_lines = -1,
					width_in_digits = 70
				}
			},
			viewFactory:row
			{
				viewFactory:static_text 
				{
					title = "For feedback, updates to this plugin or bug reports: "
				},
			},
			viewFactory:row
			{
				viewFactory:push_button 
				{
					title = Global.PluginInfoUrl,
					action =  function ()
						LrTasks.startAsyncTask (function ()
							LrHttp.openUrlInBrowser(Global.PluginInfoUrl)
						end)
					end,
				},
			}
		}
		
		LrDialogs.presentModalDialog {
			title = "Welcome to Import from Picasa",
			contents = column,
			cancelVerb = "< exclude >"
		}
	
	end)
end

return WelcomeInfoDialog